<% provide(:title, 'All users') %>
<h1>All users</h1>

<%= will_paginate %>

<ul class="users">
  <% @users.each do |user| %>
    <li>
      <%= gravatar_for user, size: 52 %>
      <%= link_to user.name, user %>
      <% if current_user.admin? && !current_user?(user) %>
      <%= link_to "delete", user, method: :delete,
                                  data: { confirm: "You sure?" } %>
      <% end %>
    </li>
  <% end %>
</ul>

<%= will_paginate %>